<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			/*
			   1.localStorage:数据可以长期保留(硬盘)
			     setItem(key,value)
				 getItem(key)
				 removeItem(key)
			   2.sessionStorage 会话范围
			
			
			*/
			var a = 6;
			//存
			localStorage.setItem("name", "张三");

			sessionStorage.setItem("age", 20);
			
			var a = sessionStorage.getItem("age");
			console.log(a);
			
			sessionStorage.removeItem("age");
		</script>
	</head>
	<body>
	</body>
</html>
